// src/controllers/enum.controller.ts
import EnumService from '@/services/enum.service';
import { Context } from 'koa';

class EnumController {
    constructor() { }

    async getEnums(ctx: Context) {
        // 提取表名数组
        const reqData = ctx.request.body as Record<string, Record<string, any>>;

        // 调用服务获取数据
        const res = await EnumService.getTableEnums(reqData);
        ctx.body = {
            code: 200,
            data: res,
      
          };

    }
}

export default new EnumController();